[//
    async function( kuo,Context,context){
        
        let $features = await Kuoplus(kuo.class);
        let $_GET = kuo.get;
        let $tuid = $_GET['tuid'] ?$_GET['tuid']:0;//推广uid
        let $appid = $features['configure']['qq'] && $features['configure']['qq']['0']?$features['configure']['qq']['0']:"";
        let $redirect_uri =KuoLink( ['login','alipay_back']);
        let $chauid = 0;
        let ISAPP = kuo.Path['0']?kuo.Path['0']:"";
        let $Security = await Mem.Get("session/"+kuo.sessionid);
        if($Security && $Security["uid"]){
            $chauid = $Security["uid"];
        }
        if(!$Security ){
            $Security={
                uid:0,
                code:0,
                tuid:0
            };
        }
        $Security.sessionid = kuo.sessionid;
        if($tuid > 0){
            $Security.tuid = $tuid;
        }
        $Security.platform =  strpos(kuo.agent,"ISAPP")?"ISAPP":"";
        if(ISAPP!=""){
            $Security.platform = "ISAPP";
        }
        if($_GET['tiaozhuan'] && $_GET['tiaozhuan'] != ""){
            $Security.tiaozhuan = decodeURI($_GET['tiaozhuan']);
        }
        let $state = Md5(kuo.sessionid);
        await Mem.Set('opentoken/'+$state ,$Security,360);
        let $url = 'https://graph.qq.com/oauth2.0/authorize?response_type=code&client_id='+$appid+'&scope=snsapi_userinfo&state='+$state+'&display='+($Security.platform=="ISAPP"?"mobile":"pc")+'&redirect_uri='+encodeURIComponent($redirect_uri);
        Context.statusCode = 302;
        Context.headers["Location"] = $url ;
        Context.body = "";
    } 
]